doctype html
include head.jade
html(ng-app="" ng-cloak)
    head
        mixin head("管理后台")
    body.container(ng-controller='adminCtrl',ng-init="tab='init'")
        .row
            //- 左边栏
            .col-md-2.class-ul
                ul.nav.bs-sidenav.bs-sidebar
                    li
                        a(href="./") 返回首页
                    li(ng-click="tab='jiaoxuelouGuanLi'")
                        a 教学楼管理
                    li(ng-click="tab='jiaoshiGuanLi'")
                        a 教室管理
                    li(ng-click="tab='yonghuGuanLi'")
                        a 用户管理
            //- 右边主体部分
            .col-md-7.ng-row-top(ng-show="tab=='init'")
                h1 请选择对应的模块
                
            .col-md-7.ng-row-top(ng-show="tab=='jiaoxuelouGuanLi'")
                form(ng-submit="clickJiaoxuelouSave()")
                    .row(ng-repeat='lou in jiaoxuelou')
                        input(ng-value="lou.name")
                        span.glyphicon.glyphicon-trash(ng-click="jiaoxuelouDel($index)")
                        span {{lou.id}}
                    .row
                        input(ng-model="jiaoxuelouNew")
                        span.glyphicon.glyphicon-floppy-disk(ng-click="jiaoxuelouAdd()")
                        span {{$index}}
                    input(type="submit")
            //- 教学楼管理
            .col-md-7.ng-row-top(ng-show="tab=='jiaoshiGuanLi'")
                select(ng-model="louNow",ng-options="lou.name for lou in jiaoxuelou")
                    option(value="") 请选择
                form(ng-submit="clickjiaoshiSave()" ng-show='louNow')
                    .row(ng-repeat="js in jiaoshi|filter:{jiaoxuelou_id:louNow.id}:true")
                        input(ng-value="js.jiaoshi_name")
                        span.glyphicon.glyphicon-trash(ng-click="jiaoshiDel(js.jiaoshi_id)")
                    .row
                        input(ng-model="jiaoshiNew")
                        span.glyphicon.glyphicon-floppy-disk(ng-click="jiaoshiAdd()")
                    input(type="submit")
            .col-md-7.ng-row-top(ng-show="tab=='yonghuGuanLi'")
                h1 用户管理
                .row
                    include admin-user.jade
                    //- input(type="submit") 添加用户
                    //- input(type="submit") 删除用户
                    //- input(type="submit") 设置管理员
                    //- input(type="submit") 取消管理员

                //- todo  添加用户 删除用户 查找  设置取消管理员
        mixin script
        
